# OpenAPI version identifier - required for OpenAPI 3.0 domains
# (c) Elexon 2022, 2023, 2024
#
# MMHS - Data Integration Platform 
# Interfaces with Event Codes
# 
# ----- update -----------------------------------------------------------------------
# December 2023/ January 2024
# ---------------------------
# IR7 Updates
# ------------------------------------------------------------------------------------
# Change history
# ====================================================================================
# Ver   Date           Ref.    Description
# ------------------------------------------------------------------------------------
# 1.8.2 12/08/2024              Support new IR8.2 release  
#       12/08/2024    DIN-1068  Make the elements of the CommonBlock.S0 mandatory         
# 1.8.1 03/05/2024              Support new IR8.1 release  
#       15/05/2024    DIN-988   Remove  IF-003-DSDeAppUpdateRM & IF-003-DSDeAppUpdateRM
#       20/05/2024    DIN-1029  Make B032 block mandatory for [SSCandProfileClass] event in IF-025 and IF-026
#       20/05/2024    DIN-1035  IF037 DSDeApp requires B002 block
#       20/05/2024    DIN-1040  Missing B095 block in IF-003-MSDeAppRM & missing B096 block in IF-003-DSDeAppRM 
#       21/05/2024    DIN-1041  Updates to IF-06x version nuumbers to align with other IFs 
#       23/05/2024    DIN-1044  The event code fix for IF-009-MPANReconnection
#       28/05/2024    DIN-992   IF-016-ActivePowerRejected required field B900List should be B900
# 1.8   22/03/2024              Support new IR8 release  
#       25/03/2024    DIN-964   IF-005-MeterUpdate & IF-005-MeterHistory Update
# 1.7.1 27/02/2024              Support new release  
#       27/02/2024    DIN-897   IF-001 Change Of Supplier S1 block needs to mandatory not A0
#       27/02/2024    DIN-922   IF-014 CustomBlock should be B900 not B900List
#       01/03/2024    DIN-919   Updates to IF-003 messages 
#       01/03/2024    DIN-928   IF-037  B010/B011 blocks are mandatory for the [DS|MS]DeAppUpdate event codes
# 1.7   13/11/2023              Support new release
#       13/11/2023    DIN-767   Update to IF-043-Payload Custom block name
#                     DIN-770   Update enum for IF-026 SSCandProfileClass contains incorrect 
#                               enumeration for IF-025
#                     DIN-785   IF-001-ChangeOfSupplier required fields updated
#                     DIN-822   IF-007 EnergisationStatusChange/Failure add required field to 
#                               custom blocks
#                     DIN-823   IF-008 Common block add R0 to the required list
#                     DIN-824   IF-004 Add M0 to the required list
#                     DIN-825   IF024 SN-Vacant CustomBlock required B057
#                               IF024 SN-NoComms CustomBlock required B057
#                               IF024 SNRemoteEnabled CustomBlock required B057, B069
#                               IF024 SNSupplierAC CustomBlock required B057, B058 
#                     DIN-830   Additonal properties false for IF-001 custom blocks
#                     DIN-844   Additional interfaces for CR023 
#       05/01/2024    DIN-819   Event Code for REP-004 updated to [SupplierDeemedTakeReport]
#       05/01/2024    DIN-821   Remove anyOf pattern - revert to standard message pattern
#                     DIN-827   Remove mandatory customBlock from IF-015
#                     DIN-832   B039 added to IF-006-MeterUpdate custom block
#                     DIN-828   IF-045-CustomBlock renamed to CustomBlock    
#                     DIN-768   Update REP-901 Event Code to remove underscores
#                     DIN-849   B099 single block not array
#       19/01/2024    DIN-870   IMS-SendMTD variant for IF-035 to add B070, B071 and B019
#       29/01/2024    DIN-886   Add B905List to IF006-MeterRemoval 
#       29/01/2024    DIN-888   Include object type in IF-024 defintions
# 1.6   19/10/2023              Support new release
#                     DIN-709   IF-014 updated from a list to a single item to match IF-021 interface
#                     DIN-710   Updates to IF-016
#                     DIN-731   For REPxxx add schema block to describe the format of the 
#                               report in the compressed payload - not populated in actual message
#                     DIN-684   REP003A added 
# 1.5.1 October 23    DIN 694   update Update [EnergisationStatusFailure] to 
#                               [EnergisationStatusChange] for IF-007-EnergisationStatusChange
#                     DIN 696   Add B023 is required for IF-018-EnergyDirection and
#                               IF-018-MUMIndicator
#                     DIN 697   IF-023 add required properties
# 1.5 - September 23   -        Formed from Interfaces v1.5 
#                     DIN 602 - Variants for IFs with muliple event codes and block population
#                     DIN 650 - Introduction of Compressed Payloads into DIP Messages
#                     DIN 655 - Tightened down block definition with the introduction 
#                               of clauses to not extend object defintions:
#                                 - required clause on all objects
#                                 - additionalProperties: 
#                                       false  - added
#                     DIN-653 - M0 block removed from IF-047
#                     DIN-647 
#                     DIN-625 - IF-035-SDS-MDROutcome B099 added as a list to handle 
#                               multiple rejections
#                     DIN-587 - Alignment on R0 blocks marked as mandatory
# ====================================================================================
#
# 

openapi: 3.0.0
info:
  title: Interface with Event Codes
  description: Interfaces reworked to include varaints where different Event Codes have different block structures 
  version: 1.8.2
  

# Dictionary items below:
components:
    
  schemas:

# IF 001 -Change of Supplier
# DIN 602 - create 2 varaints for IF-001
# 

    IF-001-Payload:
      description: IF001 Message
      type: object
      oneOf:
          - $ref: '#/components/schemas/IF-001-InitialRegistration'
          - $ref: '#/components/schemas/IF-001-ChangeOfSupplier'


    IF-001-InitialRegistration:
      description: IF001 Message
      type: object
      required:
          - CommonBlock
          - CustomBlock
      additionalProperties:
          false 
      properties:
        CommonBlock:
            description: MHHS Common Block for IF-001
            type: object
            additionalProperties:
                false 
            required: 
              - S0
              - S1
              - M0
            properties:
              S0:
                description: Sender Header block
                type: object
                properties:
                  interfaceID: 
                    type: string
                    enum: ['IF-001']
                  schemaVersion:
                    description: Version of the message schema used in the exchange
                    type: string
                    example: '011'
                    enum :
                      - '011'
                  eventCode: 
                    type: string
                    enum: 
                      - '[InitialRegistration]'
                required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                      
              S1:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
              A0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
              D0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
              M0:
               $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

        CustomBlock:
            description: IF001 Custom data block
            type: object
            additionalProperties:
                false 
            properties:
              B013:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
              B002:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B002'
#              B003:
              B004:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B004'
#              B005:
              B006:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B006'
              B022:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B022'
              B023:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B023'
              B024:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B024'
              B025:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B025'
              B026:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B026'
              B027:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B027'
              B029:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B029'
              B030:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'
              B031:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B031'
              B032:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B032'
              B035List:
                type: array
                items:
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B035'
              B037List:
                type: array
                items:
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B037'
            required:
                - B013
                - B002
                - B004
                - B022
                - B023
                - B024
                - B025
                - B026
          
    IF-001-ChangeOfSupplier:
      description: IF001 Message
      type: object
      additionalProperties:
          false 
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false 
          required: # DIN-785
              - S1
              - S0 # DIN-897
              - M0
          properties:
              S0:
                description: Sender Header block
                type: object
                properties:
                  interfaceID: 
                    type: string
                    enum: ['IF-001']
                  schemaVersion:
                    description: Version of the message schema used in the exchange
                    type: string
                    example: '011'
                    enum :
                      - '011'
                  eventCode: 
                    type: string
                    enum: 
                      - '[ChangeOfSupplier]'
                required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                      
              S1:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
              A0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
              D0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
              M0:
               $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

        CustomBlock:
            description: IF001 Custom data block
            type: object
            additionalProperties:
                false 
            properties:
              B013:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
              B002:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B002'
              B003:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B003'
              B004:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B004'
              B005:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B005'
              B006:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B006'
              B022:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B022'
              B023:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B023'
              B024:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B024'
              B025:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B025'
              B026:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B026'
              B027:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B027'
              B029:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B029'
              B030:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'
              B031:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B031'
              B032:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B032'
              B035List:
                type: array
                items:
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B035'
              B037List:
                type: array
                items:
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B037'
            required:
                - B013
                - B002
                - B003
                - B004
                - B022
                - B023
                - B024
                - B025
                - B026
                
# IF 002 - Notification to New Supplier of Site Information 
# DIN 602 - IF-002 - added required blocks 


    IF-002-Payload:
      description: IF002 Message
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-002
          type: object
          required: 
            - S0
            - S1
            - M0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-002']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[GainMPANInfo]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

        CustomBlock:
          description: IF002 Custom data block
          type: object
          additionalProperties:
              false        

          properties:
            B013: # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
            B005:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B005'
            B006:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B006'
            B022:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B022'
            B023:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B023'
            B024:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B024'
            B025:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B025'
            B026:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B026'
            B027:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B027'
            B029:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B029'
            B030:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'
            B031:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B031'
            B032:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B032'
            
            # B905 ~ B074 (Existing Meter Info) and B075 (Map INfo) Blocks are repeated for each installed meter at the MPAN
            B905List: 
              type: array
              items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B905'
    
    
            # B907 - B035, B037 & B075 blocks are repeated for each Linked MPAN, 
            B907List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B907'
    
            # B908 - B037, B038, B075 blocks are repeated for each Related MPAN
            B908List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B908'
          
          required:
            - B013
            - B022
            - B023
            - B024
            - B025
            - B026
            
# IF 003 - Notification of Revserse Migrationand De-Appointment
# DIN-602 create variants for each eventcode
# DIN-919 Add B002 block to each message variant
# DIN-988 Remove  IF-003-DSDeAppUpdateRM & IF-003-DSDeAppUpdateRM
 
    IF-003-Payload:
      oneOf:
          - $ref: '#/components/schemas/IF-003-MSDeAppRM'
          - $ref: '#/components/schemas/IF-003-DSDeAppRM'
          - $ref: '#/components/schemas/IF-003-ReverseMigNotification'



    IF-003-MSDeAppRM:
      description: IF-003 Notification of Reverse Migration De-Appointment
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
            description: MHHS Common Block for IF-003
            type: object
            required: 
              - S0
              - S1
              - M0
            additionalProperties:
                false        
            properties:
              S0:
                description: Sender Header block
                type: object
                properties:
                  interfaceID: 
                    type: string
                    enum: ['IF-003']
                  schemaVersion:
                    description: Version of the message schema used in the exchange
                    type: string
                    example: '011'
                    enum :
                      - '011'
                  eventCode: 
                    type: string
                    enum: 
                      - '[MSDeAppRM]'
                required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
      
      
              S1:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
              A0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
              D0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
              M0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'


        CustomBlock:
            description: MHHS Custom Block for IF-003 eventcode MSDeAppRM
            type: object
            additionalProperties:
                false        
            required:
                - B013
                - B008
                - B002
            properties:
              B013:
                  # CSS Switch ID              
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
      
              B008:
                  # metering Service De-Appointment Details  (Mandatory for [MSDeAppRM])                  
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B008'
              
              B002: #DIN-919
                  # Incoming Supplier Information (Mandatory)             
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B002'
                  
              B095: #DIN-1040
                  # Incoming MOP (optional)             
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B095'
                  


    IF-003-DSDeAppRM:
      description: IF-003 Notification of Reverse Migration De-Appointment eventcode DSDeAppRM
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
            description: MHHS Common Block for IF-003 DSDeAppRM
            type: object
            required: 
              - S0
              - S1
              - M0
            additionalProperties:
                false        
            properties:
              S0:
                description: Sender Header block
                type: object
                properties:
                  interfaceID: 
                    type: string
                    enum: ['IF-003']
                  schemaVersion:
                    description: Version of the message schema used in the exchange
                    type: string
                    example: '011'
                    enum :
                      - '011'
                  eventCode: 
                    type: string
                    enum: 
                      - '[DSDeAppRM]'
                required:
                  - interfaceID
                  - schemaVersion
                  - eventCode

              S1:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
              A0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
              D0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
              M0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
      
      
        CustomBlock:
            description: IF-003 Custom data block for DSDeAppRM
            type: object
            additionalProperties:
                false        
            required:
                - B013
                - B009
                - B002
            properties:
              B013:
                  # CSS Switch ID              
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
    
              B009:
                  # Data Service De-Appointment Details  (Mandatory for [DSDeAppRM])                  
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B009'

              B002: #DIN-919
                  # Incoming Supplier Information (Mandatory)             
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B002'

              B096: #DIN-1040
                  # Incoming DC (optional)             
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B096'
                  
    # end IF-003-DSDeAppRM
                

                
#    IF-003-DSDeAppUpdateRM & IF-003-MSDeAppUpdateRM removed

                
    IF-003-ReverseMigNotification:
      description: IF-003 Notification of Reverse Migration De-Appointment
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-033 ReverseMigNotification
          type: object
          required: 
            - S0
            - S1
            - M0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-003']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ReverseMigNotification]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF-003 Custom data block for ReverseMigNotification
          type: object
          additionalProperties:
              false        
          required:
              - B013
              - B094
              - B002
          properties:
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
    
            B094:
                # Incoming MOP Details
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B094'

            B002: #DIN-919
                  # Incoming Supplier Information (Mandatory)             
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B002'


# IF 004 - Comms Hub Information

    IF-004-Payload:
      description: IF-004 Message - Comms Hub Information
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-004
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            #DIN-824
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-004']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[CommsHubInfo]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

        CustomBlock:
          description: IF004 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B093
          properties:
            B093:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B093'        




# INF 005- Metering Service MTD Update to Registration


    IF-005-Payload:
      oneOf:
          - $ref: '#/components/schemas/IF-005-MeterInstall'
          - $ref: '#/components/schemas/IF-005-MeterRemoval'
          - $ref: '#/components/schemas/IF-005-MeterExchange'
          - $ref: '#/components/schemas/IF-005-MeterUpdate'
          - $ref: '#/components/schemas/IF-005-MeterHistoryUpdate'



    IF-005-MeterInstall:
      description: IF005 Message for MeterInstall
      type: object
      additionalProperties:
          false  
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-005
          type: object
          required: 
            - S0
            - S1
            - M0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-005']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MeterInstall]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
              
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock:
          description: IF005 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B906
          properties:
            B906:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B906'        
            B030:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'
##

    IF-005-MeterRemoval:
      description: IF005 Message for MeterRemoval
      type: object
      additionalProperties:
          false
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-005
          type: object
          required: 
            - S0
            - S1
            - M0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-005']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MeterRemoval]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
              
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock:
          description: IF005 Custom data block for MeterRemoval
          type: object
          additionalProperties:
              false        
          required:
              - B039
          properties:
            B039:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B039'

##
    IF-005-MeterExchange:
      description: IF005 Message for MeterExchange
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-005
          type: object
          required: 
            - S0
            - S1
            - M0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-005']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MeterExchange]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
              
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock:
          description: IF005 Custom data block MeterExchange
          type: object
          additionalProperties:
              false        
          required:
              - B906
              - B039
          properties:
            B906:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B906'        
            B039:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B039'
            B030:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'

####
    IF-005-MeterUpdate:
      description: IF005 Message for MeterUpdate
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-005
          type: object
          required: 
            - S0
            - S1
            - M0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-005']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MeterUpdate]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
              
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock:
          description: IF005 Custom data block for MeterUpdate
          type: object
          additionalProperties:
              false        
          required:
              - B906
          properties:
            B906:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B906a'      # DIN-964  
            B039:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B039'
            B030:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'

    IF-005-MeterHistoryUpdate:
      description: IF005 Message for MeterHistoryUpdate
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-005
          type: object
          required: 
            - S0
            - S1
            - M0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-005']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MeterHistoryUpdate]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
              
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock:
          description: IF005 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B906
          properties:
            B906:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B906a'      # DIN-964  
            B039:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B039'




# INF 006 - Metering Service MTD Update to Registration
# 25/08/22 ok?

    IF-006-Payload:
      description: IF006 - Metering Service MTD Update to Registration
      oneOf:
          - $ref: '#/components/schemas/IF-006-MeterInstall'
          - $ref: '#/components/schemas/IF-006-MeterRemoval'
          - $ref: '#/components/schemas/IF-006-MeterExchange'
          - $ref: '#/components/schemas/IF-006-MeterUpdate'
          - $ref: '#/components/schemas/IF-006-MeterHistoryUpdate'

    IF-006-MeterInstall:
      description: IF006 Message for MeterInstall
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-006 for MeterInstall
          type: object
          required: 
            - S0
            - S1
            - M0
            - R0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-006']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MeterInstall]'
              required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
        CustomBlock:
          description: IF006 Custom data block for MeterInstall
          type: object
          required:
              - B906
          additionalProperties:
              false        
          properties:
            B906:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B906'
            B030:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'
    
            B905List:
              type : array
              items:
                  #074/075
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B905'          
          
    IF-006-MeterRemoval:
      description: IF006 Message for Meter Removal
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-006
          type: object
          required: 
            - S0
            - S1
            - M0
            - R0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-006']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MeterRemoval]'
              required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
        CustomBlock:
          description: IF006 Custom data block for Meter Removal
          type: object
          additionalProperties:
              false      
          required:
              - B039
          properties:
            B039:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B039'
    
            # DIN-886    
            B905List:
              type : array
              items:
                  #074/075
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B905'          

                
    IF-006-MeterExchange:
      description: IF006 Message for MeterExchange
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-006
          type: object
          required: 
            - S0
            - S1
            - M0
            - R0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-006']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MeterExchange]'
              required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
        CustomBlock:
          description: IF006 Custom data block for MeterExchange
          type: object
          additionalProperties:
              false        
          required:
            - B906
            - B039
          properties:
            B906: # mandatory 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B906'
            B039: # manadatory
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B039'
            B030: # optional
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'
    
            B905List: # optional
              type : array
              items:
                  #074/075
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B905'          
                
    IF-006-MeterUpdate:
      description: IF006 Message for MeterUpdate
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-006
          type: object
          required: 
            - S0
            - S1
            - M0
            - R0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-006']
                schemaVersion:
                  description: Version of the message schema used in the update
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MeterUpdate]'
              required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
        CustomBlock:
          description: IF006 Custom data block for MeterUpdate
          type: object
          additionalProperties:
              false        
          required:
              - B906
          properties:
            B906: # required
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B906a'
      
            B030: # optional
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'

            B039: # optional DIN-832 addtion
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B039'            
    
            B905List: # optional
              type : array
              items:
                  #074/075
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B905'          
                
                
    IF-006-MeterHistoryUpdate:
      description: IF006 Message for MeterHistoryUpdate
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-006 MeterHistoryUpdate
          type: object
          required: 
            - S0
            - S1
            - M0
            - R0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-006']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MeterHistoryUpdate]'
              required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
        CustomBlock:
          description: IF006 Custom data block for MeterHistoryUpdate
          type: object
          additionalProperties:
              false        
          required:
            - B906
          properties:
            B906: # mandatory
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B906a'
      
            B039: # optional
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B039'
    

            B905List: # optional
              type : array
              items:
                  #074/075
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B905'          



# INF 007 - Change of Energisation Status
# 25/08/22 done

    IF-007-Payload:
      description: IF007 - Change of Energisation Status
      oneOf:
          - $ref: '#/components/schemas/IF-007-EnergisationStatusChange'
          - $ref: '#/components/schemas/IF-007-EnergisationStatusFailure' 


    IF-007-EnergisationStatusChange:
      description: IF007 Message for Energisation Status Change
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-007']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[EnergisationStatusChange]'
                    # DIN-694
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF007 Custom data block EnergisationStatusFailure
          type: object
          additionalProperties:
              false        
          required:
            - B025 #DIN-822
          properties:
            B025:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B025'


    IF-007-EnergisationStatusFailure:
      description: IF007 Message for EnergisationStatusFailure
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-007']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[EnergisationStatusFailure]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF007 Custom data block EnergisationStatusFailure
          type: object
          additionalProperties:
              false
          required:
            - B040 #DIN-822
          properties:
            B040:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B040'


# INF 008 - Registration Service Change of Energisation Status Notification 
# DIN 602 - 14/09/23

    IF-008-Payload:
      description: IF008 - Registration Service Change of Energisation Status Notification 
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-008
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
            - R0 # DIN-823
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-008']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[EnergisationStatusChange]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
        CustomBlock:
          description: IF008 Custom data block
          type: object
          additionalProperties:
              false    
          required:
            - B025 # DIN-823
          properties:
            B025:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B025'

# INF 009 - Registration Service CSS De-Registration Notification
# 25/08/22 - done

    IF-009-Payload:
      description: IF009 Registration Service CSS De-Registration Notification 
      oneOf:
          - $ref: '#/components/schemas/IF-009-MPANDisconnection'
          - $ref: '#/components/schemas/IF-009-MPANReconnection' # DIN-788
          - $ref: '#/components/schemas/IF-009-CSSDeRegistration'

    IF-009-MPANDisconnection:
      description: IF009 Message for MPAN Disconnection
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-009
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-009']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MPANDisconnection]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock:
          description: IF009 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B041
          properties:
            B041:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B041'

    IF-009-MPANReconnection: # DIN-788
      description: IF009 Message for MPAN Reconnection
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-009 MPAN Reconnection
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-009']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MPANReconnection]' # DIN-1044
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock:
          description: IF009 Custom data block MPAN Reconnection
          type: object
          additionalProperties:
              false        
          required:
              - B098
          properties:
            B098:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B098'

    IF-009-CSSDeRegistration:
      description: IF009 Message for CSS DeRegistration
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-009 for CSSDeRegistration
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-009']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[CSSDeRegistration]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock:
          description: IF009 Custom data block CSSDeRegistration
          type: object
          additionalProperties:
              false        
          required:
              - B042
          properties:
            B042:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B042'


# INF 013 - Notification of Defaulted UTC Settlement Period Consumption Data
# 25/08/66 queries on B049/B050 blocks
 
    IF-013-Payload:
      description: IF-013 Notification of Defaulted UTC Settlement Period Consumption Data
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-013
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-013']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ActivePowerDefaulted]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF013 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B043
            - B049
            - B067
            - B920List
          properties:
            B043:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B043'
            B049:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B049'
            B067:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B067'
      
            B920List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B920'
        

# INF 014 - Rejected - UTC Settlement Period Consumption Data
# 25/08/66 needs review - is it an array of B900 blocks?

    IF-014-Payload:
      description: IF-014 Rejected - UTC Settlement Period Consumption Data
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-014
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
            - R0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-014']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ActivePowerRejected]'
                    - '[ConsumptionOnDeEnergisedMPAN]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
        CustomBlock:
          description: IF014 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B044
              - B067
              - B900 # DIN-922
          properties:
            B044:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B044'
            B067:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B067'
            B900:
            # DIN-709 updated from a list to a single item to match IF-021 interface
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B900'


 # INF 015 - Request Historic Consumption Replay (ADV Sites Only)
 # 25/08/22 - ok

    IF-015-Payload:
      description: IF-015 Request Historic Consumption Replay (ADV Sites Only)
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock #DIN-827
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-015
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-015']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ConsumptionReplay]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

#  IF-015 has no custom block
#        CustomBlock:
#          $ref: '#/components/schemas/IF-015-CustomBlock'

          
# INF 016 - UTC Settlement Period Consumption Data - REPLAY
# DIN-710
    IF-016-Payload:
      description: IF-016 UTC Settlement Period Consumption Data - REPLAY
      oneOf:
          - $ref: '#/components/schemas/IF-016-ActivePower'
          - $ref: '#/components/schemas/IF-016-ReactivePower'
          - $ref: '#/components/schemas/IF-016-ActivePowerRejected'
          - $ref: '#/components/schemas/IF-016-ActivePowerDefaulted'
          - $ref: '#/components/schemas/IF-016-ConsumptionRequestRejected'

    IF-016-ActivePower:
      description: IF-016 replay of IF-021 UTC Settlement Period Consumption Data
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-016 Active Power
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - S2
            - M0
            - R1
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-016']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ActivePower]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            S2:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
              
        CustomBlock:
          description: IF01 copy of IF021 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B044
              - B067
              - B900
          properties:
            B044:
                #    Data Service Information (Mandatory)            
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B044'
            B067:
                #    Connection Type            
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B067'
            B900:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B900'

    IF-016-ReactivePower:
      description: IF-016 replay of IF-021 UTC Settlement Period Consumption Data
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-016 Reactive Power
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - S2
            - M0
            - R1
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-016']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ReactivePower]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            S2:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
              
    
        CustomBlock:
          description: Copy of IF021 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B044
              - B067
              - B900
          properties:
            B044:
                #    Data Service Information (Mandatory)            
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B044'
            B067:
                #    Connection Type            
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B067'
            B900:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B900'


    IF-016-ActivePowerRejected:
      description: IF-016 replay of IF-014 Rejected - UTC Settlement Period Consumption Data
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: Copy of MHHS Common Block for IF-016
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - S2
            - M0
            - R0
            - R1
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-016']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ActivePowerRejected]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            S2:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            R1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'

            
        CustomBlock:
          description: Copy of IF014 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B044
              - B067
              - B900 # DIN-992
          properties:
            B044:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B044'
            B067:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B067'
            B900:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B900'

    IF-016-ActivePowerDefaulted:
      description: IF-016 replay of IF-013 Notification of Defaulted UTC Settlement Period Consumption Data
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: Copy of MHHS Common Block for IF-013
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - S2
            - M0
            - R1
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-016']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ActivePowerDefaulted]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            S2:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
    
    
        CustomBlock:
          description: Copy of IF013 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B043
            - B049
            - B067
            - B920List
          properties:
            B043:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B043'
            B049:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B049'
            B067:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B067'
      
            B920List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B920'

    IF-016-ConsumptionRequestRejected:
      description: IF-016 ConsumptionRequestRejected 
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
      properties:
        CommonBlock:
          description: IF-016 ConsumptionRequestRejected 
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
            - R1
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-016']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ConsumptionRequestRejected]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'


#####

        
# INF 018 - Notification of Registration Data Item Changes
# 25/08/22 - Need to check IF022/23 list

    IF-018-Payload:
      description: IF-018 Notification of Registration Data Item Changes
      oneOf:
          - $ref: '#/components/schemas/IF-018-AddressChg'
          - $ref: '#/components/schemas/IF-018-GSPChg'
          - $ref: '#/components/schemas/IF-018-DomPremInd'
          - $ref: '#/components/schemas/IF-018-DUOSTariffIDChg'
          - $ref: '#/components/schemas/IF-018-EnergyDirection'
          - $ref: '#/components/schemas/IF-018-DCCEnrolment'
          - $ref: '#/components/schemas/IF-018-MUMIndicator'

    IF-018-AddressChg:
      # used for both [AddressChg] and [GSPChg] as the block defns are the same
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-018
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-018']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[AddressChg]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
            
        CustomBlock:
          description: IF018 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B001
            - B022
          properties:
            B013:
              # CSS Switch ID              
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
            B001:
              # GSP Eff From (Mandatory for Events [AddressChg] & [GSPChg])                    
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B001'
            B022:
              # MPAN Address (Mandatory for Events [AddressChg] & [GSPChg])                    
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B022'
            
    IF-018-GSPChg:
      # used for both [AddressChg] and [GSPChg] as the block defns are the same
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-018
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-018']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[GSPChg]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
            
        CustomBlock:
          description: IF018 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B001
            - B022
          properties:
            B013:
              # CSS Switch ID              
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
            B001:
              # GSP Eff From (Mandatory for Events [GSPChg])                    
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B001'
            B022:
              # MPAN Address (Mandatory for Events [GSPChg])                    
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B022'

            
    IF-018-DUOSTariffIDChg:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-018
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-018']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DUOSTariffIDChg]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
            
        CustomBlock:
          description: IF018 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B024
          properties:
            B013:
              # CSS Switch ID              
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
            B024:
              # MPAN Line Loss (Mandatory for [DUOSTariffIDChg] )                    
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B024'

    IF-018-DomPremInd:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-018 for DomPremInd
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-018']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DomPremInd]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
            
        CustomBlock:
          description: IF018 Custom data block for DomPremInd
          type: object
          additionalProperties:
              false        
          required:
              - B028
          properties:
            B013:
              # CSS Switch ID              
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
            B028:
              # Domestic Premise Indicator (Mandatory for Event [DomPremInd])                    
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B028'

    IF-018-EnergyDirection:
      description:  IF-018 Used for event codes EnergyDirection 
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-018
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-018']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[EnergyDirection]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
            
        CustomBlock:
          description: IF018 Custom data block for event codes EnergyDirection
          type: object
          additionalProperties:
              false        
          required:
            - B023 
            # DIN 696
          properties:
            B013:
              # CSS Switch ID              
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
            B023:
              # MPAN Connection Type (Mandatory for Events [EnergyDirection], [MUMIndicator])                    
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B023'

    IF-018-MUMIndicator:
      description:  IF-018 Used for event codes MUMIndicator 
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-018
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-018']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MUMIndicator]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
            
        CustomBlock:
          description: IF018 Custom data block for event codes  MUMIndicator 
          type: object
          additionalProperties:
              false
          required:
            - B023
            # DIN 696
          properties:
            B013:
              # CSS Switch ID              
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
            B023:
              # MPAN Connection Type (Mandatory for Events [MUMIndicator])                    
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B023'


    IF-018-DCCEnrolment:
      description:  IF-018 Used for event code DCCEnrolment
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-018
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-018']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DCCEnrolment]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
            
        CustomBlock:
          description: IF018 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B029
          properties:
            B013:
              # CSS Switch ID              
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
            B029:
              # DDC Enrolment (Mandatory for Event [DCCEnrolment])                    
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B029'


# IF 019 - Manage Meterpoint Relationships

    IF-019-Payload:
      description: IF-019 Manage Meterpoint Relationships
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-019
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M1
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-019']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[LinkedImportExportCreate]'
                    - '[LinkedImportExportAdd]'
                    - '[LinkedImportExportRemove]'
                    - '[RelatedCreate]'
                    - '[RelatedAdd]'
                    - '[RelatedRemove]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
       
       
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M1'
    
        CustomBlock:
          description: IF019 Custom data block
          type: object
          additionalProperties:
              false  
          required:
              - B090List
          properties:
            B090List:
                type: array
                items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B090'
    
            B091:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B091'
        
# IF 020 - Manage Meterpoint Relationships Response

    IF-020-Payload:
      description: IF-020 Manage Meterpoint Relationships Response
      oneOf:
            - $ref: '#/components/schemas/IF-020-LinkedImportExportCreate'
            - $ref: '#/components/schemas/IF-020-LinkedImportExportAdd'
            - $ref: '#/components/schemas/IF-020-LinkedImportExportRemove'
            - $ref: '#/components/schemas/IF-020-RelatedCreate'
            - $ref: '#/components/schemas/IF-020-RelatedAdd'
            - $ref: '#/components/schemas/IF-020-RelatedRemove'

    IF-020-LinkedImportExportCreate:  
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-020-LinkedImportExportCreate
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M1
            - R0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-020']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[LinkedImportExportCreate]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    # M1 not M0 !
            M1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M1'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
    
        CustomBlock:
          description: IF020 Custom data block
          type: object
          additionalProperties:
              false 
          required:
              - B090List
          properties:
            B090List:
                type: array
                items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B090'
    
            B091:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B091'
      
            B907List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B907'
                
    IF-020-LinkedImportExportAdd:  
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-020-LinkedImportExportCreate
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M1
            - R0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-020']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[LinkedImportExportAdd]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    # M1 not M0 !
            M1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M1'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
    
        CustomBlock:
          description: IF020 Custom data block
          type: object
          additionalProperties:
              false 
          required:
              - B090List
          properties:
            B090List:
                type: array
                items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B090'
    
            B091:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B091'
      
            B907List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B907'
                
    IF-020-LinkedImportExportRemove:  
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-020-LinkedImportExportCreate
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M1
            - R0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-020']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[LinkedImportExportRemove]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    # M1 not M0 !
            M1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M1'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
    
        CustomBlock:
          description: IF020 Custom data block
          type: object
          additionalProperties:
              false 
          required:
              - B090List
          properties:
            B090List:
                type: array
                items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B090'
    
            B091:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B091'
      
            B907List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B907'
                

    IF-020-RelatedCreate:  
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-020-LinkedImportExportCreate
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M1
            - R0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-020']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[RelatedCreate]'
                    - '[RelatedAdd]'
                    - '[RelatedRemove]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    # M1 not M0 !
            M1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M1'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
    
        CustomBlock:
          description: IF020 Custom data block
          type: object
          additionalProperties:
              false 
          required:
              - B090List
          properties:
            B090List:
                type: array
                items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B090'
    
            B091:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B091'
      
      
    IF-020-RelatedAdd:  
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-020-LinkedImportExportCreate
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M1
            - R0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-020']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[RelatedAdd]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    # M1 not M0 !
            M1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M1'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
    
        CustomBlock:
          description: IF020 Custom data block
          type: object
          additionalProperties:
              false 
          required:
              - B090List
          properties:
            B090List:
                type: array
                items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B090'
    
            B091:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B091'
      
    IF-020-RelatedRemove:  
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-020-LinkedImportExportCreate
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M1
            - R0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-020']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[RelatedRemove]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    # M1 not M0 !
            M1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M1'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
    
        CustomBlock:
          description: IF020 Custom data block
          type: object
          additionalProperties:
              false 
          required:
              - B090List
          properties:
            B090List:
                type: array
                items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B090'
    
            B091:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B091'



      
# IF 021 - UTC Settlement Period Consumption Data
#

    IF-021-Payload:
      description: IF-021 UTC Settlement Period Consumption Data
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-021
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-021']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ActivePower]'
                    - '[ReactivePower]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF021 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B044
              - B067
              - B900
          properties:
            B044:
                #    Data Service Information (Mandatory)            
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B044'
    
            B067:
                #    Connection Type            
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B067'
      
            B900:
            # updated from a list to a single item Aug 2023
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B900'


# IF 022 - Load Shape Period Data
# 25/8/22 ok?

    IF-022-Payload:
      description: IF-022 Load Shape Period Data
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-022
          type: object
          required: 
            - S0
            - S1
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-022']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[LSSPeriodData]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    
            
        CustomBlock:
          description: IF022 Custom data block
          type: object
          additionalProperties:
              false  
          required:
            - B903List
          properties:
            B903List:
              description: Load shape data (periods)
              type : array
              items:                         
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B903'

# IF 023 - Load Shape Total Data
# 25/8/22 

    IF-023-Payload:
      description: IF-023 Load Shape Total Data
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-023
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-023']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[LSSTotalsData]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    
    
        CustomBlock:
          description: IF023 Custom data block
          type: object
          additionalProperties:
              false
          required:
            - B912List
            # DIN 697
          properties:
            B912List:
              description: Load shape data (totals)
              type : array
              items:                         
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B912'
            
            
# IF 024 - Supplier Advisory Notification to Data Service
# 25/8/22 - ok

    IF-024-Payload:
      description: IF-024 Supplier Advisory Notification to Data Service
      type: object
      oneOf:
          - $ref: '#/components/schemas/IF-024-SN-Vacant' 
          - $ref: '#/components/schemas/IF-024-SN-NoComms'
          - $ref: '#/components/schemas/IF-024-SN-RemoteEnabled' 
          - $ref: '#/components/schemas/IF-024-SN-RemoteDisabled'
          - $ref: '#/components/schemas/IF-024-SN-SupplierAC'
          - $ref: '#/components/schemas/IF-024-SN-OffPeakDec'

    IF-024-SN-Vacant:
      description: MHHS Common Block for IF-024 SN-Vacant and SN-Comms (same blocks)
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-024']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[SN-Vacant]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

        CustomBlock:
          description: IF024 Custom data block
          type: object
          additionalProperties:
              false 
          # DIN-825    
          required:
              - B057
          properties:
            B057:
                #   Supplier Advisory Notification (Mandatory)                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B057'

    IF-024-SN-NoComms:
      description: MHHS Common Block for IF-024 SN-Vacant and SN-Comms (same blocks)
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-024']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[SN-NoComms]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

        CustomBlock:
          description: IF024 Custom data block
          type: object
          additionalProperties:
              false   
          #DIN-825    
          required:
            - B057
          properties:
            B057:
                #   Supplier Advisory Notification (Mandatory)                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B057'


    IF-024-SN-RemoteEnabled:
      description: MHHS Common Block for IF-024 SN-RemoteEnabled 
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-024']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[SN-RemoteEnabled]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

        CustomBlock:
          description: IF024-SN-RemoteEnabled Custom data block
          type: object
          additionalProperties:
              false
          required: # DIN-825
              - B057
              - B069
          properties:
            B057:
                #   Supplier Advisory Notification (Mandatory)                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B057'
            B069:
                #   Supplier Advisory Notification Meter ID ( Mandatory for SN-RemoteEnabled and SN-RemoteDisabled)                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B069'

    IF-024-SN-RemoteDisabled:
      description: MHHS Common Block for IF-024 SN-RemoteDisabled
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-024']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[SN-RemoteDisabled]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

        CustomBlock:
          description: IF-024 SN-RemoteDisabled Custom data block
          type: object
          additionalProperties:
              false  
          required:
            - B057
            - B069
          properties:
            B057:
                #   Supplier Advisory Notification (Mandatory)                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B057'
            B069:
                #   Supplier Advisory Notification Meter ID ( Mandatory for SN-RemoteEnabled and SN-RemoteDisabled)                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B069'


    IF-024-SN-SupplierAC:
      description: MHHS Common Block for IF-024 SN-Supplier AC 
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-024']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[SN-SupplierAC]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

        CustomBlock:
          description: IF024-SN-SupplierAC Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B057
            - B058
          properties:
            B057:
                #   Supplier Advisory Notification (Mandatory)                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B057'
            B058:
                # Supplier Nominated Annual Consumption (Mandatory for Event [SN-SupplierAC])                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B058'

    IF-024-SN-OffPeakDec:
      description: MHHS Common Block for IF-024 OffPeakDec
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-024']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[SN-OffPeakDec]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

        CustomBlock:
          description: IF024 Custom data block for SN-OffPeakDec
          type: object
          additionalProperties:
              false 
          required:
              - B097List
          properties:
            B097List:
              type: array
              items:
                # Off Peak declarations repeated for each OffPeak Consumption Day
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B097'
            
            
# IF 025 - Supplier Advisory Notification to Data Service
# 25/8/22 ok
# 22/11/22 added [SSCandProfileClass]


    IF-025-Payload:
      description: IF-025 Supplier Advisory Notification to Data Service
      type: object
      oneOf:
          - $ref: '#/components/schemas/IF-025-ConsentGranularity'
          - $ref: '#/components/schemas/IF-025-IHDInfo'
          - $ref: '#/components/schemas/IF-025-SMSO'
          - $ref: '#/components/schemas/IF-025-SSCandProfileClass'
      

    IF-025-ConsentGranularity:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-025
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-025']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ConsentGranularity]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF025 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B068
          properties:
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013' 
            B068:
                # MPAN Consent Info (Mandatory for Event [ConsentGranularity]                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B068'

    IF-025-IHDInfo:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-025
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-025']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[IHDInfo]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF025 Custom data block
          type: object
          additionalProperties:
              false
          required:
              - B030
          properties:
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013' 
            B030:
                #  IHD Info (Mandatory for Event [IHDInfo])                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'

    IF-025-SMSO:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-025
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-025']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[SMSO]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF025 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B031
          properties:
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013' 
            B031:
                # SMSO (Mandatory for Event [SMSO])                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B031'


    IF-025-SSCandProfileClass:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-025
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-025']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[SSCandProfileClass]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF025 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B032  #DIN-1029
          properties:
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013' 
            B032:
                # MPAN Legacy Info (Optional - Provided for Traditional Meters only )                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B032'

            
# IF 026 - Notification of Registration Supplier Data Item Changes
# 25/8/22 ok
# 22/11/22 added [SSCandProfileClass]



    IF-026-Payload:
      description: IF-026 Supplier Advisory Notification to Data Service
      oneOf:
          - $ref: '#/components/schemas/IF-026-ConsentGranularity'
          - $ref: '#/components/schemas/IF-026-IHDInfo'
          - $ref: '#/components/schemas/IF-026-SMSO'
          - $ref: '#/components/schemas/IF-026-SSCandProfileClass'
      

    IF-026-ConsentGranularity:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-026
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
            - R0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-026']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ConsentGranularity]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
        
    
        CustomBlock:
          description: IF-026 Custom data block for Consent Granularity
          type: object
          additionalProperties:
              false        
          required:
              - B068
          properties:
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013' 
            B068:
                # MPAN Consent Info (Mandatory for Event [ConsentGranularity]                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B068'

    IF-026-IHDInfo:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-026 for IHDInfo
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
            - R0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-026']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[IHDInfo]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
    
        CustomBlock:
          description: IF-026 Custom data block for IHDInfo
          type: object
          additionalProperties:
              false
          required:
              - B030
          properties:
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013' 
            B030:
                #  IHD Info (Mandatory for Event [IHDInfo])                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'

    IF-026-SMSO:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-026 for SMSO
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
            - R0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-026']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[SMSO]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
    
        CustomBlock:
          description: IF-026 Custom data block for SMSO
          type: object
          additionalProperties:
              false        
          required:
              - B031
          properties:
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013' 
            B031:
                # SMSO (Mandatory for Event [SMSO])                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B031'


    IF-026-SSCandProfileClass:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-026 for SSCandProfileClass
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
            - R0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-026']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[SSCandProfileClass]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
    
        CustomBlock:
          description: IF-026 Custom data block for SSCandProfileClass
          type: object
          additionalProperties:
              false        
          required:
              - B032  #DIN-1029
          properties:
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013' 
            B032:
                # MPAN Legacy Info (Optional - Provided for Traditional Meters only )                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B032'

            
# IF 027 - Supplier Consumption Amendment Request
# 25/8/22 ok

    IF-027-Payload:
      description: IF-027 Supplier Consumption Amendment Request
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-027
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-027']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ConsumptionAmendment]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode

            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock:
          description: IF027 Custom data block
          type: object
          additionalProperties:
              false
          required:
              - B902List
          properties:
            B902List:
              description: MQID (B045) Supplier Consumption Ammendment Requests
              type : array
              items:                         
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B902'


# IF-028 Supplier Consumption Ammendment Request Response
# 25/8/22 ok

    IF-028-Payload:
      description: IF-028 Supplier Consumption Ammendment Request Response
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-028
          type: object
          required: 
            - S0
            - S1
            - M0
            - R0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-028']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ConsumptionAmendment]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
        CustomBlock:
          description: IF028 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B902List
          properties:
            B902List:
              description: MQID (B045) Supplier Consumption Ammendment Requests
              type : array
              items:                         
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B902'

# IF 031 - Supplier Service Provider Appointment Request
# 25/8/22 ok

    IF-031-Payload:
      description: IF-031 Supplier Service Provider Appointment Request
      oneOf:
          - $ref: '#/components/schemas/IF-031-MSApp'
          - $ref: '#/components/schemas/IF-031-DSApp'

    IF-031-MSApp:
      description: MHHS Common Block for IF-031
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
          CommonBlock:
            type: object
            additionalProperties:
                false        
            required: 
                - S0
                - S1
                - M0
            properties:
              S0:
                description: Sender Header block
                type: object
                additionalProperties:
                    false        
                properties:
                  interfaceID: 
                    type: string
                    enum: ['IF-031']
                  schemaVersion:
                    description: Version of the message schema used in the exchange
                    type: string
                    example: '011'
                    enum :
                      - '011'
                  eventCode: 
                    type: string
                    enum: 
                      - '[MSApp]'
                required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                      
              S1:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
              A0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
              D0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
              M0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
      
      
          CustomBlock:
            description: IF031 Custom data block
            type: object
            additionalProperties:
                false        
            required:
                - B070
            properties:
              B013:
                  # CSS Switch ID              
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013' 
              B070:
                  # Proposed Metering Service Details (Mandatory for Event [MSApp])                  
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B070'

    IF-031-DSApp:
      description: MHHS Common Block for IF-031
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
          CommonBlock:
            type: object
            additionalProperties:
                false        
            required: 
              - S0
              - S1
              - M0
            properties:
                S0:
                  description: Sender Header block
                  type: object
                  additionalProperties:
                      false        
                  properties:
                    interfaceID: 
                      type: string
                      enum: ['IF-031']
                    schemaVersion:
                      description: Version of the message schema used in the exchange
                      type: string
                      example: '011'
                      enum :
                        - '011'
                    eventCode: 
                      type: string
                      enum: 
                        - '[DSApp]'
                  required:
                    - interfaceID
                    - schemaVersion
                    - eventCode
                        
                S1:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
                A0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
                D0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
                M0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
        
        
          CustomBlock:
              description: IF031 Custom data block
              type: object
              additionalProperties:
                  false        
              required:
                  - B071
              properties:
                B013:
                    # CSS Switch ID              
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013' 

                B071:
                    # Proposed Data Service Details (Mandatory for Event [DSApp])                  
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B071'
    


# IF 032 - Supplier Service Provider Appointment Request Response
# 25/8/22 ok

    IF-032-Payload:
      description: IF-032 Supplier Service Provider Appointment Request Response
      oneOf:
          - $ref: '#/components/schemas/IF-032-MSAppInitialResp'
          - $ref: '#/components/schemas/IF-032-DSAppInitialResp'


    IF-032-MSAppInitialResp:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-032
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-032']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MSAppInitialResp]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
        CustomBlock:
          description: IF032 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B070
          properties:
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013' 
            B070:
                # Proposed Metering Service Details (Mandatory for Event [MSApp])                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B070'
    

    IF-032-DSAppInitialResp:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-032
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-032']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DSAppInitialResp]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
            
        CustomBlock:
          description: IF032 Custom data block
          type: object
          additionalProperties:
              false        
          required:
              - B071
          properties:
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013' 
            B071:
                # Proposed Data Service Details (Mandatory for Event [DSApp])                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B071'


# IF 033 - Registration Service Request for Service Appointment
# 25/8/22 check arrays

    IF-033-Payload:
      description: IF-033 Registration Service Request for Service Appointment
      oneOf:
          - $ref: '#/components/schemas/IF-033-MSAppSPRequest'
          - $ref: '#/components/schemas/IF-033-DSAppSPRequest'


    IF-033-MSAppSPRequest:
      description: MHHS Common Block for IF-033 MSAppSPRequest
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          required: 
            - S0
            - S1
            - M0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-033']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MSAppSPRequest]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF033 Custom data block for MSAppSPRequest
          type: object
          additionalProperties:
              false    
          required:
            - B012
            - B070
            - B022
            - B023
            - B024
            - B025
            - B026
            
          properties:
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'       
            B070: 
            #Proposed Metering Service Details (Mandatory for Event [MSApp])                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B070'
            B072: 
            # Incumbent Metering Service (Conditionally Mandatory for Only) Ref Interfaces Notes
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B072'                    
            B022: 
            # MPAN Address (Mandatory)                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B022'
            B023: 
            # MPAN Connection Type (Mandatory)                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B023'
            B024: 
            # MPAN Line Loss (Mandatory for [ChangeOfSupplier])                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B024'
            B025: 
            #  MPAN Energisation Status (Mandatory)                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B025'
            B026: 
            #  MPAN Market Segment (Mandatory for [ChangeOfSupplier])                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B026'
            B029: 
            #  MPAN Smart Info (Conditionally Mandatory - Required only for Smart Meters)                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B029'
                
            B031: 
            #  SMSO Info (Optional)                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B031'
    
            B032: 
            #  MPAN Legacy Info (Optional - Populated only for Traditional Meters)                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B032'  
    
            B905List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B905'
                
            B907List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B907'      
    
            B908List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B908'

    IF-033-DSAppSPRequest:
      description: MHHS Common Block for IF-033 for DSAppSPRequest
      type: object
      additionalProperties:
          false        
      required: 
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-033']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DSAppSPRequest]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock:
          description: IF033 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B012
            - B071
            - B022
            - B023
            - B024
            - B025
            - B026
          properties:
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'       
            B071: 
            # Proposed Metering Service Details (Mandatory for Event [DSApp])                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B071'
            B072: 
            # Incumbent Metering Service (Conditionally Mandatory) Ref Interfaces Notes
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B072'                    
            B022: 
            # MPAN Address (Mandatory)                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B022'
            B023: 
            # MPAN Connection Type (Mandatory)                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B023'
            B024: 
            # MPAN Line Loss (Mandatory for [ChangeOfSupplier])                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B024'
            B025: 
            #  MPAN Energisation Status (Mandatory)                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B025'
            B026: 
            #  MPAN Market Segment (Mandatory for [ChangeOfSupplier])                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B026'
            B029: 
            #  MPAN Smart Info (Conditionally Mandatory - Required only for Smart Meters)                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B029'
                
            B031: 
            #  SMSO Info (Optional)                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B031'
    
            B032: 
            #  MPAN Legacy Info (Optional - Populated only for Traditional Meters)                    
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B032'  
    
            B905List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B905'
                
            B907List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B907'      
    
            B908List:
              type : array
              items: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B908'

            
# IF 034 - Supplier Service Provider Appointment Request Response
# 25/8/22 - ok

    IF-034-Payload:
      description: IF-034 Supplier Service Provider Appointment Request Response
      oneOf:
          - $ref: '#/components/schemas/IF-034-MSAppSPResponse'
          - $ref: '#/components/schemas/IF-034-DSAppSPResponse'
          - $ref: '#/components/schemas/IF-034-SDS-MDRUpdate'
      

    IF-034-MSAppSPResponse:
      description: MHHS Common Block for IF-034 MSAppSPResponse
      type: object
      required:
          - CommonBlock
          - CustomBlock
      additionalProperties:
          false        
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-034']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MSAppSPResponse]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF034 Custom data block for MSAppSPResponse
          type: object
          additionalProperties:
              false        
          required:
              - B007
              - B012
              - B070
          properties:
            B007:
                # Proposed Metering Service Details (Mandatory for Event [MSAppSPRepsonse] & [DSAppSPRepsonse])                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B007'
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
            B070:
                # Proposed Metering Service Details (Mandatory for Event [MSAppSPRepsonse])                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B070'


    IF-034-DSAppSPResponse:
      description: MHHS Common Block for IF-034 DSAppSPResponse
      type: object
      required:
          - CommonBlock
          - CustomBlock
      additionalProperties:
          false        
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-034']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DSAppSPResponse]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF034 Custom data block for DSAppSPResponse
          type: object
          additionalProperties:
              false        
          required:
              - B007
              - B012
              - B071
          properties:
            B007:
                # Proposed Metering Service Details (Mandatory for Event [MSAppSPRepsonse] & [DSAppSPRepsonse])                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B007'
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
    
            B070:
                # Proposed Metering Service Details (Mandatory for Event [MSAppSPRepsonse])                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B070'
    
            B071:
                # Proposed Data Service Details (Mandatory for Event [DSAppSPRepsonse])                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B071'
    
            B018:
                # Proposed Data Service Details                 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B018'

    IF-034-SDS-MDRUpdate:
      description: MHHS Common Block for IF-034 MDRUpdate
      type: object
      required:
          - CommonBlock
          - CustomBlock
      additionalProperties:
          false        
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-034']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[SDS-MDRUpdate]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF034 Custom data block for SDS-MDRUpdate
          type: object
          additionalProperties:
              false        
          required:
              - B012
              - B018
          properties:
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
            B018:
                # Proposed Data Service Details (Mandatory for Event [SDS-MDRUpdate])                  
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B018'


# IF 035 - Supplier Service Provider Appointment Request Response
# 5 variants for 9 event codes (there are 2 variant that have 3 event codes with the same combination of blocks)

    IF-035-Payload:
      description: IF-035 Supplier Service Provider Appointment Request Response
      oneOf:
                - $ref: '#/components/schemas/IF-035-MSAppAccepted'
                - $ref: '#/components/schemas/IF-035-MSAppRejected'
                - $ref: '#/components/schemas/IF-035-MSAppLapsed'
                - $ref: '#/components/schemas/IF-035-DSAppAccepted'
                - $ref: '#/components/schemas/IF-035-DSAppRejected'
                - $ref: '#/components/schemas/IF-035-DSAppLapsed'
                - $ref: '#/components/schemas/IF-035-IMS-SendMTD'
                - $ref: '#/components/schemas/IF-035-SDS-MDROutcome'
                - $ref: '#/components/schemas/IF-035-DCC-MDROutcome'

    IF-035-MSAppAccepted:
      description: MHHS Common Block for IF-035 MSAppAccepted, MSAppRejected & MSAppLapsed
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-035']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MSAppAccepted]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF035 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B007
            - B012
            - B070
          properties:
            B007:
                # Service Provider Appointment Outcome                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B007'
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
    
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
    
            B070:
                # Proposed Metering Service Details                   
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B070'
    
    IF-035-MSAppRejected:
      description: MHHS Common Block for IF-035 MSAppAccepted, MSAppRejected & MSAppLapsed
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-035']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MSAppRejected]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF035 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B007
            - B012
            - B070
          properties:
            B007:
                # Service Provider Appointment Outcome                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B007'
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
    
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
    
            B070:
                # Proposed Metering Service Details                   
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B070'

    IF-035-MSAppLapsed:
      description: MHHS Common Block for IF-035 MSAppAccepted, MSAppRejected & MSAppLapsed
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-035']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[MSAppLapsed]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF035 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B007
            - B012
            - B070
          properties:
            B007:
                # Service Provider Appointment Outcome                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B007'
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
    
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
    
            B070:
                # Proposed Metering Service Details                   
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B070'

    IF-035-DSAppAccepted:
      description: MHHS Common Block for IF-035 DSAppAccepted 
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-035']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DSAppAccepted]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF035 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B007
            - B012
            - B071
          properties:
            B007:
                # Service Provider Appointment Outcome                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B007'
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
    
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
    
            B071:
                # Proposed Data Service Details                   
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B071'
    
            B019:
                # Assigned MDR 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B019'
    


    IF-035-DSAppRejected:
      description: MHHS Common Block for IF-035 DSAppRejected & DSAppLapsed
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-035']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DSAppRejected]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF035 Custom data block for IF-035 DSAppRejected & DSAppLapsed # no B019
          type: object
          additionalProperties:
              false        
          required:
            - B007
            - B012
            - B071
          properties:
            B007:
                # Service Provider Appointment Outcome                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B007'
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
    
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
    
            B071:
                # Proposed Data Service Details                   
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B071'
    
    IF-035-DSAppLapsed:
      description: MHHS Common Block for IF-035 DSAppRejected & DSAppLapsed
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-035']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DSAppLapsed]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF035 Custom data block for IF-035 DSAppRejected & DSAppLapsed # no B019
          type: object
          additionalProperties:
              false        
          required:
            - B007
            - B012
            - B071
          properties:
            B007:
                # Service Provider Appointment Outcome                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B007'
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
    
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
    
            B071:
                # Proposed Data Service Details                   
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B071'
    

    IF-035-IMS-SendMTD:
      description: MHHS Common Block for IF-035 IMS-SendMTD
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-035']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[IMS-SendMTD]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF035 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B007
            - B012
          properties:
            B007:
                # Service Provider Appointment Outcome                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B007'
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
            B070: # DIN-870
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B070'
            B071:  # DIN-870
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B071'
            B019:  # DIN-870
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B019'

    

    IF-035-SDS-MDROutcome:
      description: MHHS Common Block for IF-035 MDROutcome
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-035']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[SDS-MDROutcome]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF035 Custom data block for SDS-MDROutcome
          type: object
          additionalProperties:
              false        
          required:
            - B012
            - B092  
            - B099 # DIN-849
          properties:
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
            B092:
                # SDS MDR Outcome 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B092'
            B099: # DIN-849
                # Response Block
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B099'



    IF-035-DCC-MDROutcome:
      description: MHHS Common Block for IF-035 DCC MDROutcome
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-035']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DCC-MDROutcome]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF035 Custom data block for DCC-MDROutcome
          type: object
          additionalProperties:
              false        
          required:
            - B012
            - B066
          properties:
            B012:
                # Service Provider Appointment Requesting Supplier 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
    
            B013:
                # CSS Switch ID              
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'

            B066:
                # DCC MDR Outcome 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B066'
    

# IF036 

# IF 036 - Service Provider Notification of Appointment

    IF-036-Payload:
      description: IF-036 Service Provider Notification of Appointment
      oneOf: 
            - $ref: '#/components/schemas/IF-036-MSAppActive'
            - $ref: '#/components/schemas/IF-036-DSAppActive'

    IF-036-MSAppActive:
        type: object
        additionalProperties:
            false        
        required:
            - CommonBlock
            - CustomBlock
        properties:
          CommonBlock:
            description: MHHS Common Block for IF-036 event code MSAppActive
            type: object
            additionalProperties:
                false        
            required: 
              - S0
              - S1
              - M0
            properties:
              S0:
                description: Sender Header block
                type: object
                additionalProperties:
                    false        
                properties:
                  interfaceID: 
                    type: string
                    enum: ['IF-036']
                  schemaVersion:
                    description: Version of the message schema used in the exchange
                    type: string
                    example: '011'
                    enum :
                      - '011'
                  eventCode: 
                    type: string
                    enum: 
                      - '[MSAppActive]'
                required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
      
      
              S1:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
              A0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
              D0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
              M0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
      
      
      
          CustomBlock:
            description: IF036 Custom data block for MSAppActive
            type: object
            additionalProperties:
                false        
            required:
                - B012
                - B014
                - B022
                - B023
                - B024
                - B025
                - B026
                - B028
            properties:
              B012:
                  # Service Provider Appointment Requesting Supplier 
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
      
              B013:
                  # CSS Switch ID              
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
      
              B014: 
              # Metering Service Details (Mandatory for Event [MSAppActive])
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B014'
              
              B005: 
              # Incumbent Service Providers                   
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B005'
              B017: 
              # Partner Data Service Info
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B017'
              B022: 
              # MPAN Address
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B022'
              B023: 
              # MPAN Connection Info
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B023'
              B024: 
              # MPAN DUOS tarriff Id
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B024'
              B025: 
              #  MPAN Energisation Status (Mandatory)                    
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B025'
              B026: 
              #  MPAN Market Segment (Mandatory for [ChangeOfSupplier])                    
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B026'
      
              B027: 
              #  Assumed Annual Consumption
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B027'
      
              B028: 
              #  Domestic Premise Indicator
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B028'

              B029: 
              #  MPAN Smart Info (Conditionally Mandatory - Required only for Smart Meters)                    
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B029'
      
              B030: 
              #  
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'
                  
              B031: 
              #  SMSO Info (Optional)                                        
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B031'
      
              B032: 
              #  MPAN Legacy Info (Optional - Populated only for Traditional Meters)                    
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B032'  
      
              B905List:
                type : array
                items: 
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B905'
                  
              B035List:
                type : array
                items: 
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B035'      
      
              B037List:
                type : array
                items: 
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B037'

    IF-036-DSAppActive:
        type: object
        additionalProperties:
            false        
        required:
            - CommonBlock
            - CustomBlock
        properties:
          CommonBlock:
            description: MHHS Common Block for IF-036 event code DSAppActive
            type: object
            additionalProperties:
                false        
            required: 
              - S0
              - S1
              - M0
            properties:
              S0:
                description: Sender Header block
                type: object
                additionalProperties:
                    false        
                properties:
                  interfaceID: 
                    type: string
                    enum: ['IF-036']
                  schemaVersion:
                    description: Version of the message schema used in the exchange
                    type: string
                    example: '011'
                    enum :
                      - '011'
                  eventCode: 
                    type: string
                    enum: 
                      - '[DSAppActive]'
                required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
      
              S1:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
              A0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
              D0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
              M0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
      
      
      
          CustomBlock:
            description: IF036 Custom data block for event code DSAppActive
            type: object
            additionalProperties:
                false        
            required:
                - B012
                - B015
                - B022
                - B023
                - B024
                - B025
                - B026
                - B028
# DIN 699 remove from required list  - B068
            properties:
              B012:
                  # Service Provider Appointment Requesting Supplier 
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
      
              B013:
                  # CSS Switch ID              
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
      
              B015: 
              # Data Service details (Mandatory for Event [DSAppActive])
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B015'
              B019: 
              # Assigne MDR
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B019'                    
              B005: 
              # Incumbent Service Providers                   
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B005'
              B016: 
              # Partner MS Info                  
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B016'
              B022: 
              # MPAN Address
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B022'
              B023: 
              # MPAN Connection Info
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B023'
              B024: 
              # MPAN DUOS tarriff Id
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B024'
              B025: 
              #  MPAN Energisation Status (Mandatory)                    
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B025'
              B026: 
              #  MPAN Market Segment (Mandatory for [ChangeOfSupplier])                    
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B026'
      
              B027: 
              #  Assumed Annual Consumption
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B027'
      
              B028: 
              #  Domestic Premise Indicator
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B028'
              B068:
                # MPAN Consent Info (Mandatory for Event [DSAppActive])                   
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B068'
      
              B029: 
              #  MPAN Smart Info (Conditionally Mandatory - Required only for Smart Meters)                    
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B029'
      
              B030: 
              #  
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B030'
                  
              B031: 
              #  SMSO Info (Optional)                                        
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B031'
      
              B032: 
              #  MPAN Legacy Info (Optional - Populated only for Traditional Meters)                    
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B032'  
      
              B905List:
                type : array
                items: 
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B905'
                  
              B035List:
                type : array
                items: 
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B035'      
      
              B037List:
                type : array
                items: 
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B037'

#
# IF - 037
# IF 037 - Service Provider Notification of Appointment
#
    IF-037-Payload:
      description: IF-037 Service Provider Notification of Appointment
      oneOf:
          - $ref: '#/components/schemas/IF-037-MSDeApp'
          - $ref: '#/components/schemas/IF-037-DSDeApp'
          - $ref: '#/components/schemas/IF-037-MSDeAppUpdate'
          - $ref: '#/components/schemas/IF-037-DSDeAppUpdate'

    IF-037-MSDeApp:
      description: IF-037 Service Provider Notification of Appointment for event code MSDeApp
      type: object
      required:
            - CommonBlock
            - CustomBlock
      additionalProperties:
          false        
      properties:
          CommonBlock:
              description: MHHS Common Block for IF-037 event code MSDeApp
              type: object
              additionalProperties:
                  false        
              required: 
                  - S0
                  - S1
                  - M0
              properties:
                S0:
                  description: Sender Header block
                  type: object
                  additionalProperties:
                      false        
                  properties:
                    interfaceID: 
                      type: string
                      enum: ['IF-037']
                    schemaVersion:
                      description: Version of the message schema used in the exchange
                      type: string
                      example: '011'
                      enum :
                        - '011'
                    eventCode: 
                      type: string
                      enum: 
                        - '[MSDeApp]'
                  required:
                    - interfaceID
                    - schemaVersion
                    - eventCode
        
                S1:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
                A0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
                D0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
                M0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
        
          CustomBlock:
              description: IF037 Custom data block for event code MSDeApp
              type: object
              additionalProperties:
                  false        
              required:
                  - B008
              properties:
                B013:
                    # CSS Switch ID              
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
        
                B008:
                    # Metering Service De-Appointment Details  (Mandatory for [MSDeApp])                
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B008'

                B010:
                    # Incoming Metering Service Details 
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B010'

                B002:
                    # Incoming Metering Service Details 
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B002'
        

    IF-037-DSDeApp:
      description: IF-037 Service Provider Notification of Appointment for event code DSDeApp
      type: object
      required:
            - CommonBlock
            - CustomBlock
      additionalProperties:
          false        
      properties:
          CommonBlock:
              description: MHHS Common Block for IF-037 for event code DSDeApp
              type: object
              additionalProperties:
                  false        
              required: 
                  - S0
                  - S1
                  - M0
              properties:
                S0:
                  description: Sender Header block
                  type: object
                  additionalProperties:
                      false        
                  properties:
                    interfaceID: 
                      type: string
                      enum: ['IF-037']
                    schemaVersion:
                      description: Version of the message schema used in the exchange
                      type: string
                      example: '011'
                      enum :
                        - '011'
                    eventCode: 
                      type: string
                      enum: 
                        - '[DSDeApp]'
                  required:
                    - interfaceID
                    - schemaVersion
                    - eventCode

                S1:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
                A0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
                D0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
                M0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

          CustomBlock:
              description: IF037 Custom data block for DSDeApp
              type: object
              additionalProperties:
                  false        
              required:
                  - B009
              properties:
                B013:
                    # CSS Switch ID              
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
        
                B009:
                    # Data Service De-Appointment Details  (Mandatory for [DSDeApp])                  
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B009'
                    
                B011:
                    # Incoming Data Service  Details  
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B011'

                B002:  # Added DIN-1035
                    # Incoming Metering Service Details 
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B002'



    IF-037-MSDeAppUpdate:
      description: IF-037 Service Provider Notification of Appointment for event code MSDeAppUpdate
      type: object
      required:
            - CommonBlock
            - CustomBlock
      additionalProperties:
          false        
      properties:
          CommonBlock:
              description: MHHS Common Block for IF-037 for event code MSDeAppUpdate
              type: object
              additionalProperties:
                  false        
              required: 
                  - S0
                  - S1
                  - M0
              properties:
                S0:
                  description: Sender Header block
                  type: object
                  additionalProperties:
                      false        
                  properties:
                    interfaceID: 
                      type: string
                      enum: ['IF-037']
                    schemaVersion:
                      description: Version of the message schema used in the exchange
                      type: string
                      example: '011'
                      enum :
                        - '011'
                    eventCode: 
                      type: string
                      enum: 
                        - '[MSDeAppUpdate]'
                  required:
                    - interfaceID
                    - schemaVersion
                    - eventCode
        
        
                S1:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
                A0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
                D0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
                M0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
        
        
        
          CustomBlock:
              description: IF037 Custom data block for event code MSDeAppUpdate & DSDeAppUpdate
              type: object
              additionalProperties:
                  false        
              required:
                  - B010
              properties:
                B013:
                    # CSS Switch ID              
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
                B010:
                    # CSS Switch ID              
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B010'
        

    IF-037-DSDeAppUpdate:
      description: IF-037 Service Provider Notification of Appointment for event code DSDeAppUpdate
      type: object
      required:
            - CommonBlock
            - CustomBlock
      additionalProperties:
          false        
      properties:
          CommonBlock:
              description: MHHS Common Block for IF-037 for event code DSDeAppUpdate
              type: object
              additionalProperties:
                  false        
              required: 
                  - S0
                  - S1
                  - M0
              properties:
                S0:
                  description: Sender Header block
                  type: object
                  additionalProperties:
                      false        
                  properties:
                    interfaceID: 
                      type: string
                      enum: ['IF-037']
                    schemaVersion:
                      description: Version of the message schema used in the exchange
                      type: string
                      example: '011'
                      enum :
                        - '011'
                    eventCode: 
                      type: string
                      enum: 
                        - '[DSDeAppUpdate]'
                  required:
                    - interfaceID
                    - schemaVersion
                    - eventCode
        
        
                S1:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
                A0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
                D0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
                M0:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
        
        
        
          CustomBlock:
              description: IF037 Custom data block for event code DSDeAppUpdate
              type: object
              additionalProperties:
                  false        
              required:
                  - B011
              properties:
                B013:
                    # CSS Switch ID              
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B013'
                B011:
                    # CSS Switch ID              
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B011'

#
# IF 038 - Customer Direct Contract Advisory
# 

    IF-038-Payload:
      description: IF-038 Customer Direct Contract Advisory
      oneOf:
          - $ref: '#/components/schemas/IF-038-DirectContractMSAdd'
          - $ref: '#/components/schemas/IF-038-DirectContractDSAdd'
          - $ref: '#/components/schemas/IF-038-DirectContractDSRemove'
          - $ref: '#/components/schemas/IF-038-DirectContractMSRemove'

    IF-038-DirectContractMSAdd:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-038
          type: object
          required: 
            - S0
            - S1
            - M0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-038']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DirectContractMSAdd]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock:
          description: IF038 Custom data block
          type: object
          additionalProperties:
              false       
          required:
            - B020
          properties:
            B020:
                #  Customer Direct Contract MS Info ~ Mandatory for event [DirectContractMSAdd]                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B020'
    

    IF-038-DirectContractDSAdd:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-038
          type: object
          required: 
            - S0
            - S1
            - M0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-038']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DirectContractDSAdd]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock:
          description: IF038 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B021
          properties:
            B021:
                #  Customer Direct Contract DS Info ~ Mandatory for event [DirectContractDSAdd]                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B021'

    IF-038-DirectContractDSRemove:
      type: object
      description: IF038 for event code DirectContractMSRemove / DirectContractDSRemove
      additionalProperties:
          false        
      required:
          - CommonBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-038
          type: object
          required: 
            - S0
            - S1
            - M0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-038']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DirectContractDSRemove]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
# no custom block required, M0 only 

    IF-038-DirectContractMSRemove:
      type: object
      description: IF038 for event code DirectContractMSRemove / DirectContractDSRemove
      additionalProperties:
          false        
      required:
          - CommonBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-038
          type: object
          required: 
            - S0
            - S1
            - M0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-038']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DirectContractMSRemove]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
# no custom block required, M0 only 

# 
# INF 039 - Customer Direct Contract Advisory Response
# 

    IF-039-Payload:
      description: IF039 Customer Direct Contract Advisory Response
      oneOf:
          - $ref: '#/components/schemas/IF-039-DirectContractMSAdd'
          - $ref: '#/components/schemas/IF-039-DirectContractDSAdd'
          - $ref: '#/components/schemas/IF-039-DirectContractDSRemove'
          - $ref: '#/components/schemas/IF-039-DirectContractMSRemove'

    IF-039-DirectContractMSAdd:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-039
          type: object
          required: 
            - S0
            - S1
            - M0
            - R0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-039']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DirectContractMSAdd]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'

        CustomBlock:
          description: IF039 Custom data block
          type: object
          additionalProperties:
              false       
          required:
            - B020
          properties:
            B020:
                #  Customer Direct Contract MS Info ~ Mandatory for event [DirectContractMSAdd]                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B020'
    

    IF-039-DirectContractDSAdd:
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-039
          type: object
          required: 
            - S0
            - S1
            - M0
            - R0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-039']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DirectContractDSAdd]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'

        CustomBlock:
          description: IF039 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B021
          properties:
            B021:
                #  Customer Direct Contract DS Info ~ Mandatory for event [DirectContractDSAdd]                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B021'

    IF-039-DirectContractMSRemove:
      type: object
      description: IF039 for event code DirectContractMSRemove / DirectContraceDSRemove
      additionalProperties:
          false        
      required:
          - CommonBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-039
          type: object
          required: 
            - S0
            - S1
            - M0
            - R0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-039']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DirectContractMSRemove]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
    
    IF-039-DirectContractDSRemove:
      type: object
      description: IF039 for event code DirectContractMSRemove / DirectContraceDSRemove
      additionalProperties:
          false        
      required:
          - CommonBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-039
          type: object
          required: 
            - S0
            - S1
            - M0
            - R0
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-039']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[DirectContractDSRemove]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
    


# No CustomBlock required for event codes DirectContractMSRemove & DirectContractDSRemove

        

# IF 040 - Notification of ECS Calculated Consumption 
# 25/8/22 - done

    IF-040-Payload:
      description: IF040 Notification of ECS Calculated Consumption 
      type: object
      required:
        - CustomBlock
        - CommonBlock
      additionalProperties:
          false        
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-040
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-040']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[AnnualConsumption]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                  
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF040 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B059
            # DIN 698
          properties:
            B059:
                #  Annual consumption mandatory                
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B059'
            
# IF 041 - Cumulative Register Reading
  
    IF-041-Payload:
      description: IF041 Smart/Advanced Readings
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-041
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-041']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[ReadingRemote]'
                      - '[ReadingRemv]'
                      - '[ReadingInstl]'
                      - '[ReadingEnergisationChg]'
                      - '[ReadingCOR]'
                      - '[ReadingOnSite]'
                      - '[ReadingCOS]' 
                      - '[DSEstimate]'
                      - '[SupplierAgreedCOS]'
                      - '[ReadingOverride]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
    
        CustomBlock:
          description: IF041 Custom data block
          type: object
          additionalProperties:
              false        
          properties:
    
          #properties:  # DIN-447 - Updated to be either OR
          # B064 or B065 block
         # DIN-821 remove anyOf pattern - revert to standard message pattern 
          
            B064List:
                type: array
                items:
                    #  Conditionally Mandatory
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B064'
                  
            B065List:
                type: array 
                items:
                    #  Smart Meter Configurable Register Readings (Optional)
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B065'
                maxItems: 48    




# IF 043 - Registration Service Notification of Change in Connection Type
# 25/8/22 ok

    IF-043-Payload:
      description: IF-043 Registration Service Notification of Change in Connection Type
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:

        CommonBlock:
          description: MHHS Common Block for IF-043
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-043']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                    - '[ConnectionTypeChange]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
  
        CustomBlock: #DIN-767
          description: IF043 Custom data block
          type: object
          additionalProperties:
              false
          required:
              - B023
          properties:
            B023:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B023'

# IF 044 - Registration Service Notification of Change in Market Segment

    IF-044-Payload:
      description: IF044 Registration Service Notification of Change in Market Segment
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-044
          type: object
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-044']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[MarketSegmentChange]'               
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF044 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B026
            - B023
          properties:
            B026:
                #  MPAN Market Segment 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B026'
    
            B023:
                #    MPAN Connection Type (Mandatory)            
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B023'
            
# IF 045 - Registration Service Reminder Notification

    IF-045-Payload:
      description: IF045 Registration Service Reminder Notification

      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for IF-045
          type: object
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-045']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[InvalidMarketSegment]'
                      - '[ConsentGranularityInvalid]'
                      - '[NoMSAppointed]'
                      - '[NoDSAppointed]'                
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
        CustomBlock: #DIN-828
          description: IF045 Custom data block
          type: object
          additionalProperties:
              false        
          properties:
            B060:
                #    Registration reminder additonal information            
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B060'
            
            
# IF 047 - Notification of the Publication of a Downloadable Asset

    IF-047-Payload:
      description: IF047 Notification of the Publication of a Downloadable Asset
      type: object
      additionalProperties:
          false        
      required:
          - CommonBlock
          - CustomBlock
      properties:

        CommonBlock:
          description: MHHS Common Block for IF-047
          additionalProperties:
              false        
          type: object
          required: 
            - S0
            - S1
          properties:
            S0:
              description: Sender Header block
              type: object
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-047']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[ISD]'               
              required:
                - interfaceID
                - schemaVersion
                - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    
        CustomBlock:
          description: IF047 Custom data block
          type: object
          additionalProperties:
              false        
          properties:
            P01:
                #    Publication variant             
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P01'
            P02List:
                type: array
                items:    
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P02'

# New 18/11/2022
# IF 050 - EES Exclusive Updates

    IF-050-Payload:
      description: IF050 EES Exclusive Updates
      oneOf:
          - $ref: '#/components/schemas/IF-050-MPANCreation'
          - $ref: '#/components/schemas/IF-050-MPStatusChange'
          - $ref: '#/components/schemas/IF-050-GreenDeal'


    IF-050-MPANCreation:
      description: MHHS Common Block for IF-050 - Event Code MPAN Creation
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-050']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[MPANCreation]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                   
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF050 Custom data block for MPANCreation
          type: object
          additionalProperties:
              false        
          required:
            - B001
            - B022
            - B023
            - B024
            - B025
            - B026
            - B079
          properties:
            B001:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B001'
            B022:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B022'
            B023:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B023'
            B024:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B024'
            B025:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B025'
            B026:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B026'
            B079:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B079'

            
    IF-050-MPStatusChange:
      description: MHHS Common Block for IF-050 - Event Code MP Status Change
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-050']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[MPStatusChange]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                   
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF050 Custom data block
          type: object
          additionalProperties:
              false        
          required:
            - B079
          properties:
            B079:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B079'

    IF-050-GreenDeal:
      description: MHHS Common Block for IF-050 - Event Code Green Deal
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-050']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[GreenDeal]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                   
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: IF050 Custom data block
          type: object
          additionalProperties:
              false  
          required:
            - B080
          properties:
            B080:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B080'

# DIN-844 introduction of MDR reports

# New 18/01/2024
# IF 061 - MDR Start 

    IF-061-Payload:
      description: Request from SDS to initiate an MDR begins Data Retrieval Activity
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-061']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[MDRStart]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                   
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
    
    
        CustomBlock:
          description: Request from SDS to initiate an MDR begins Data Retrieval Activity Custom Block
          type: object
          additionalProperties:
              false        
          required:
            - B019
            - B078
            - B025
            - B068
          properties:
            B019:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B019'
            B012:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
            B078: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B078'
            B025:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B025'
            B068:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B068'
            B031:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B031'
            B074List:
              type: array
              items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B074'
            B060:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B060'

# IF 062 - MDR Start Response 

    IF-062-Payload:
      description: Response to SDS request to initiate an MDR begins Data Retrieval Activity
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
            - R0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-062']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[MDRStartResponse]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                   
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'
            R0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/R0'
    
    
        CustomBlock:
          description: Response to SDS to initiate an MDR begins Data Retrieval Activity Custom Block
          type: object
          additionalProperties:
              false        
          required:
            - B019
            - B078
            - B025
            - B068
          properties:
            B019:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B019'
            B012:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B012'
            B078: 
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B078'
            B025:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B025'
            B068:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B068'
            B031:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B031'
            B074List:
              type: array
              items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B074'
            B060:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B060'

# IF 063 - MDR Stop 

    IF-063-Payload:
      description: Response from SDS request to Stop a MDR Service 
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-063']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[MDRStop]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                   
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

    
        CustomBlock:
          description: SDS to stop an MDR service Custom Block
          type: object
          additionalProperties:
              false        
          required:
            - B083
          properties:
            B083:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B083'
            B060:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B060'

# IF 064 - MDR Consumption

    IF-064-Payload:
      description: Provide MDR Consumption  
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-064']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[MDRConsumption]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                   
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

    
        CustomBlock:
          description: MDR Consumption Period data
          type: object
          additionalProperties:
              false        
          required:
            - B045
            - B941List
          properties:
            B045:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B045'
            B941List:
              type: array
              maxItems: 200
              items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B941'
            B060:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B060'

# IF 065 - MDR Request / Provide Meter Reading


    IF-065-Payload:
      description: MDR Request / Provide Meter Reading
      oneOf:
          - $ref: '#/components/schemas/IF-065-ReadingRemote'
          - $ref: '#/components/schemas/IF-065-MDRInstantaneous'
          - $ref: '#/components/schemas/IF-065-MDRTOU'
          - $ref: '#/components/schemas/IF-065-MDRConsumption'

    IF-065-ReadingRemote:
      description: MDR Request / Provide Meter Reading 
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-065']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[ReadingRemote]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                   
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

    
        CustomBlock:
          description: IF-065 Reading Remote
          type: object
          additionalProperties:
              false        
          properties:
            B076List:
              type: array
              items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B076'
            B065List:
              type: array
              items:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B065'
            B060:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B060'

    IF-065-MDRInstantaneous:
      description: MDR Request / Provide Meter Reading 
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-065']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[MDRInstantaneous]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                   
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

    
        CustomBlock:
          description: IF-065 MDRInstantaneous
          type: object
          additionalProperties:
              false        
          properties:
            B060:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B060'


    IF-065-MDRTOU:
      description: MDR Request / Provide Meter Reading 
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-065']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[MDRTOU]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                   
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

        CustomBlock:
          description: IF-065 MDRTOU
          type: object
          additionalProperties:
              false        
          required:
            - B077
          properties:
            B077:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B077'
            B060:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B060'

    IF-065-MDRConsumption:
      description: MDR Request / Provide Meter Reading 
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          additionalProperties:
              false        
          required: 
            - S0
            - S1
            - M0
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['IF-065']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '011'
                  enum :
                    - '011'
                eventCode: 
                  type: string
                  enum: 
                      - '[MDRConsumption]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
                   
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
            M0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/M0'

        CustomBlock:
          description: IF-065 Consumption
          type: object
          additionalProperties:
              false        
          required:
            - B077
          properties:
            B077:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B077'
            B060:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/B060'

###~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# REP002 - LDSO report (Supplier) for DUoS – aggregated data


    REP-002-Payload:
      description: Supplier report for DUoS – aggregated data
      type: object
      required:
          - CommonBlock
          - CustomBlock
      additionalProperties:
          false        
      properties:
        CommonBlock:
          description: MHHS Common Block for REP002
          type: object
          additionalProperties:
              false        
          required:
            - S0
            - S1
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['REP-002']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '008'
                  enum: 
                    - '008'
                eventCode: 
                  type: string
                  enum: 
                      - '[DUOSSupplierAggData]'
              required:
                - interfaceID
                - schemaVersion
                - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
              
        CustomBlock:
            description: MHHS Common Block for REP002, report adopts REP-002-CustomBlock format
            type: object
            additionalProperties:
                false        
            required:
            - P03
            properties:
                P03:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P03'
                schema:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/ECS-Reports/1.8.2#/components/schemas/REP-002-CustomBlock'
# DIN-731 Add schema block to describe the format of the report in the compressed payload - not populated in actual message              


# REP002A - Embedded Network report for DUoS – aggregated data

    REP-002A-Payload:
      description: Embedded Network report for DUoS – aggregated data
      type: object
      required:
        - CommonBlock
        - CustomBlock
      additionalProperties:
          false        
      properties:
        CommonBlock:
            description: MHHS Common Block for REP002A
            type: object
            additionalProperties:
                false        
            properties:
              S0:
                description: Sender Header block
                type: object
                additionalProperties:
                    false        
                properties:
                  interfaceID: 
                    type: string
                    enum: ['REP-002A']
                  schemaVersion:
                    description: Version of the message schema used in the exchange
                    type: string
                    example: '008'
                    enum: 
                      - '008'
                  eventCode: 
                    type: string
                    enum: 
                        - '[DUoSEmbeddedLDSOAggData]'
                required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                     
              S1:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
              A0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
              D0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
      
            required:
              - S0
              - S1
        CustomBlock:
            description: MHHS Common Block for REP002A, report adopts REP-002A-CustomBlock format
            type: object
            additionalProperties:
                false        
            required:
            - P03
            properties:
                P03:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P03'
                schema:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/ECS-Reports/1.8.2#/components/schemas/REP-002A-CustomBlock'
# DIN-731 Add schema block to describe the format of the report in the compressed payload - not populated in actual message              
              

# REP002B - Embedded Network report (LDSO) for DUoS – aggregated data

    REP-002B-Payload:
      description: Embedded Network report (LDSO) for DUoS – aggregated data
      type: object
      required:
        - CommonBlock
        - CustomBlock
      additionalProperties:
          false        
      properties:
        CommonBlock:
            description: MHHS Common Block for REP002B
            type: object
            additionalProperties:
                false        
            properties:
              S0:
                description: Sender Header block
                type: object
                additionalProperties:
                    false        
                properties:
                  interfaceID: 
                    type: string
                    enum: ['REP-002B']
                  schemaVersion:
                    description: Version of the message schema used in the exchange
                    type: string
                    example: '008'
                    enum: 
                      - '008'
                  eventCode: 
                    type: string
                    enum: 
                        - '[DUoSLDSOAggData]'
                required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                     
              S1:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
              A0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
              D0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
      
            required:
              - S0
              - S1
        CustomBlock:
            description: MHHS Common Block for REP002B, report adopts REP-002B-CustomBlock format
            type: object
            additionalProperties:
                false        
            required:
            - P03
            properties:
                P03:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P03'
                schema:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/ECS-Reports/1.8.2#/components/schemas/REP-002B-CustomBlock'
# DIN-731 Add schema block to describe the format of the report in the compressed payload - not populated in actual message              



# REP003 - BM Unit Allocated Demand Volumes to Suppliers

    REP-003-Payload:
      description: BM Unit Allocated Demand Volumes to Suppliers
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for REP003
          type: object
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['REP-003']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '008'
                  enum: 
                    - '008'
                eventCode: 
                  type: string
                  enum: 
                      - '[BMUnitAllocatedDemandVolumesToMarketParticipants]'
              required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                      
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    
          required:
            - S0
            - S1

        CustomBlock:
            description: MHHS Common Block for REP002, report adopts REP-002-CustomBlock format
            type: object
            additionalProperties:
                false        
            required:
            - P03
            properties:
                P03:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P03'
                schema:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/ECS-Reports/1.8.2#/components/schemas/REP-003-CustomBlock'
# DIN-731 Add schema block to describe the format of the report in the compressed payload - not populated in actual message              
              
# REP003A - Aggregated BM Unit Allocated Demand Volumes to Suppliers
# DIN-684
    REP-003A-Payload:
      description: Aggregated BM Unit Allocated Demand Volumes to Suppliers
      type: object
      additionalProperties:
          false        
      required:
        - CommonBlock
        - CustomBlock
      properties:
        CommonBlock:
          description: MHHS Common Block for REP003
          type: object
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['REP-003A']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '008'
                  enum: 
                    - '008'
                eventCode: 
                  type: string
                  enum: 
                      - '[AggregatedBMUnitAllocatedDemandVolumes]'
              required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
    
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    
          required:
            - S0
            - S1

        CustomBlock:
            description: MHHS Common Block for REP003A, report adopts REP-003A-CustomBlock format
            type: object
            additionalProperties:
                false        
            required:
            - P03
            properties:
                P03:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P03'
                schema:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/ECS-Reports/1.8.2#/components/schemas/REP-003A-CustomBlock'
                  


# REP004 - Supplier Deemed Take Report

    REP-004-Payload:
      description: Supplier Deemed Take Report
      type: object
      required:
        - CommonBlock
        - CustomBlock
      additionalProperties:
          false        
      properties:
        CommonBlock:
          description: MHHS Common Block for REP004
          type: object
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['REP-004']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '008'
                  enum: 
                    - '008'
                eventCode: 
                  type: string
                  enum: 
                      - '[SupplierDeemedTakeReport]'
              required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                      
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
          required:
            - S0
            - S1
        CustomBlock:
            description: MHHS Common Block for REP004, report adopts REP-004-CustomBlock format
            type: object
            additionalProperties:
                false        
            required:
                - P03
            properties:
                P03:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P03'
                schema:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/ECS-Reports/1.8.2#/components/schemas/REP-004-CustomBlock'
# DIN-731 Add schema block to describe the format of the report in the compressed payload - not populated in actual message              
              


# REP006 - Aggregated Uncorrected volumes by CCC to Market Participants

    REP-006-Payload:
      description: Aggregated Uncorrected volumes by CCC to Market Participants
      type: object
      required:
        - CommonBlock
        - CustomBlock
      additionalProperties:
          false        
      properties:
        CommonBlock:
          description: MHHS Common Block for REP006
          type: object
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['REP-006']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '008'
                  enum: 
                    - '008'
                eventCode: 
                  type: string
                  enum: 
                      - '[UncorrectedConsumptionAndLossesByCCCID]'
              required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    
          required:
            - S0
            - S1
            
        CustomBlock:
            description: MHHS Common Block for REP006, report adopts REP-006-CustomBlock format
            type: object
            additionalProperties:
                false        
            required:
            - P03
            properties:
                P03:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P03'
                schema:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/ECS-Reports/1.8.2#/components/schemas/REP-006-CustomBlock'
# DIN-731 Add schema block to describe the format of the report in the compressed payload - not populated in actual message              
              



# REP007 - VAS Exception Report to Suppliers

    REP-007-Payload:
      description: VAS Exception Report to Suppliers
      type: object
      required:
        - CommonBlock
        - CustomBlock
      additionalProperties:
          false        
      properties:
        CommonBlock:
          description: MHHS Common Block for REP007
          type: object
          additionalProperties:
              false        
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['REP-007']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '008'
                  enum: 
                    - '008'
                eventCode: 
                  type: string
                  enum: 
                      - '[BMUnitDefaultsToSuppliers]'
              required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                   
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
    
          required:
            - S0
            - S1
        
        CustomBlock:
            description: MHHS Common Block for REP007, report adopts REP-007-CustomBlock format
            type: object
            additionalProperties:
                false        
            required:
            - P03
            properties:
                P03:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P03'
                schema:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/ECS-Reports/1.8.2#/components/schemas/REP-007-CustomBlock'
# DIN-731 Add schema block to describe the format of the report in the compressed payload - not populated in actual message              
              

# REP008 -  MDS Exception Report to LDSOs

    REP-008-Payload:
      description:  MDS Exception Report to LDSOs 
      type: object
      required:
        - CommonBlock
        - CustomBlock
      additionalProperties:
          false        
      properties:
        CommonBlock:
          description: MHHS Common Block for REP008
          type: object
          additionalProperties:
              false        
          required:
            - S0
            - S1
          properties:
            S0:
              description: Sender Header block
              type: object
              additionalProperties:
                  false        
              properties:
                interfaceID: 
                  type: string
                  enum: ['REP-008']
                schemaVersion:
                  description: Version of the message schema used in the exchange
                  type: string
                  example: '008'
                  enum: 
                    - '008'
                eventCode: 
                  type: string
                  enum: 
                      - '[LDSOLLFDefaultData]'
              required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
            S1:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
            A0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
            D0:
              $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
         
        CustomBlock:
            description: MHHS Common Block for REP008, report adopts REP-008-CustomBlock format
            type: object
            additionalProperties:
                false        
            required:
            - P03
            properties:
                P03:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P03'
                schema:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/ECS-Reports/1.8.2#/components/schemas/REP-008-CustomBlock'
# DIN-731 Add schema block to describe the format of the report in the compressed payload - not populated in actual message              
              


# REP009 Half Hourly metered data for Suppliers that is used by the CM Settlement Services Provider in calculating CM data, and/ or by the CFD Settlement Services provider in calculating CFD data.

    REP-009-Payload:
      description:  EMRS Report for Suppliers
      type: object
      required:
          - CommonBlock
          - CustomBlock
      additionalProperties:
            false        
      properties:
        CommonBlock:
          description: MHHS Common Block for REP009
          type: object
          required:
            - S0
            - S1
          additionalProperties:
              false        
          properties:
              S0:
                description: Sender Header block
                type: object
                additionalProperties:
                    false        
                properties:
                  interfaceID: 
                    type: string
                    enum: ['REP-009']
                  schemaVersion:
                    description: Version of the message schema used in the exchange
                    type: string
                    example: '008'
                    enum: 
                      - '008'
                  eventCode: 
                    type: string
                    enum: 
                        - '[EMRSReportForSuppliers]'
                required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                   
              S1:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
              A0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
              D0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
        
  
        CustomBlock:
            description: MHHS Common Block for REP002, report adopts REP-002-CustomBlock format
            type: object
            additionalProperties:
                false        
            required:
            - P03
            properties:
                P03:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P03'
                schema:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/ECS-Reports/1.8.2#/components/schemas/REP-009-CustomBlock'
# DIN-731 Add schema block to describe the format of the report in the compressed payload - not populated in actual message              
              

  # REP900 
  
    REP-900-Payload:
        description:  LDSO E-Bill - Distribution Invoice
        type: object
        required:
          - CommonBlock
          - CustomBlock
        additionalProperties:
            false        
        properties:
            CommonBlock:
                description: MHHS Common Block for REP900
                type: object
                additionalProperties:
                    false        
                properties:
                  S0:
                    description: Sender Header block
                    type: object
                    additionalProperties:
                        false        
                    properties:
                      interfaceID: 
                        type: string
                        enum: ['REP-900']
                      schemaVersion:
                        description: Version of the message schema used in the exchange
                        type: string
                        example: '008'
                        enum: 
                          - '008'
                      eventCode: 
                        type: string
                        enum: 
                            - '[DUoSSupplierInvData]'
                    required:
                        - interfaceID
                        - schemaVersion
                        - eventCode
                         
                  S1:
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
                  A0:
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
                  D0:
                    $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
          
                required:
                  - S0
                  - S1
      
            CustomBlock:
                description: MHHS Common Block for REP002, report adopts REP-002-CustomBlock format
                type: object
                additionalProperties:
                    false        
                required:
                - P03
                properties:
                    P03:
                      $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P03'
                    schema:
                      $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/ECS-Reports/1.8.2#/components/schemas/REP-900-CustomBlock'
# DIN-731 Add schema block to describe the format of the report in the compressed payload - not populated in actual message              
              
  
  

  # REP901 

    REP-901-Payload:
        description:  LDSO E-Bill - Distribution Invoice
        type: object
        required:
            - CommonBlock
            - CustomBlock
        additionalProperties:
            false        
        properties:
          CommonBlock:
            description: MHHS Common Block for REP901
            type: object
            additionalProperties:
                false        
            properties:
              S0:
                description: Sender Header block
                type: object
                additionalProperties:
                    false        
                properties:
                  interfaceID: 
                    type: string
                    enum: ['REP-901']
                  schemaVersion:
                    description: Version of the message schema used in the exchange
                    type: string
                    example: '008'
                    enum: 
                      - '008'
                  eventCode: 
                    type: string
                    enum: 
                        - '[DUoSEmbeddedLDSOAggInvData]'
                        - '[DUoSSupplierAggInvData]'
                required:
                  - interfaceID
                  - schemaVersion
                  - eventCode
                     
              S1:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/S1'
              A0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/A0'
              D0:
                $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/D0'
      
            required:
              - S0
              - S1
  
          CustomBlock:
            description: MHHS Common Block for REP901, report adopts REP-901-CustomBlock format
            type: object
            additionalProperties:
                false        
            required:
            - P03
            properties:
                P03:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/RealCommonBlocks/1.8.2#/components/schemas/P03'
                schema:
                  $ref: 'https://api.swaggerhub.com/domains/MHHSPROGRAMME/ECS-Reports/1.8.2#/components/schemas/REP-901-CustomBlock'
# DIN-731 Add schema block to describe the format of the report in the compressed payload - not populated in actual message              
              
# end #